Skip to content

chore: remove obsolete code and deprecated features#229

Merged
j-d-ha merged 7 commits into
mainfrom
chore/remove-dead-code
Dec 12, 2025
Merged

chore: remove obsolete code and deprecated features#229
j-d-ha merged 7 commits into
mainfrom
chore/remove-dead-code

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Dec 11, 2025

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

This PR removes obsolete and deprecated code that was previously marked for removal in version 2.0.0, including deprecated OpenTelemetry adapter methods, unused source generator syntax providers, and the obsolete BootstrapHttpClient property.

Key changes:

  • Removed deprecated GetOpenTelemetryTracer* extension methods from LambdaOpenTelemetryAdapters.cs
  • Removed UseOpenTelemetryTracingSyntaxProvider that tracked deprecated method calls
  • Removed obsolete BootstrapHttpClient property from LambdaHostOptions
  • Removed obsolete BootstrapHttpClient handling from LambdaBootstrapAdapter
  • Updated namespace reference in LambdaApplicationBuilderBuildSyntaxProvider (from AwsLambda.Host.Builder to MinimalLambda.Builder)
  • Updated verify tests and added snapshot files for improved test coverage

Impact:

  • Net reduction: ~680 lines of code removed
  • Cleaner codebase with deprecated functionality removed
  • Simplified source generator pipeline

✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests
  • I've added/updated documentation or README
  • I've followed the coding style for this project
  • I've tested the changes locally (if applicable)

🧪 Related Issues or PRs

N/A - General code cleanup of deprecated features


💬 Notes for Reviewers

This is a cleanup PR that removes code previously marked with [Obsolete] attributes indicating removal in v2.0.0. All removed code had alternatives already in place, so this should be a straightforward removal.

The verify test snapshots were added to ensure the source generator continues working correctly after removing the UseOpenTelemetryTracingSyntaxProvider.

…tions

- Deleted `LambdaOpenTelemetryAdapters` to eliminate redundant tracing extension methods.
- Removed associated unit tests for deprecated methods in `LambdaOpenTelemetryServiceProviderExtensionsTests`.
- Deprecated methods have been replaced by the `UseOpenTelemetryTracing` API.
…property

- Deleted `BootstrapHttpClient` property marked as obsolete.
- The recommended replacement is `AddLambdaBootstrapHttpClient()` or `TryAddLambdaBootstrapHttpClient()`.
- Aligns with planned removal in version 2.0.0.
…ent` handling

- Eliminated code dependent on `BootstrapHttpClient` marked as obsolete.
- Simplifies the constructor by directly using the injected `httpClient`.
- Aligns with recent removal of `BootstrapHttpClient`.
…SyntaxProvider`

- Deleted the `UseOpenTelemetryTracingSyntaxProvider` no longer in use.
- Aligns with recent changes emphasizing simplified tracing integrations.
- Ensures source generator code is streamlined and free of deprecated utilities.
…ilder syntax provider

- Changed the `ContainingNamespace` from `AwsLambda.Host` to `MinimalLambda` for target operation.
- Aligns with updated project structure and naming conventions.
…` handling

- Removed `UseOpenTelemetryTracingInfos` from `CompilationInfo` model.
- Deleted `UseOpenTelemetryTracingSyntaxProvider` references in `MapHandlerIncrementalGenerator`.
- Cleaned up associated code to streamline source generator logic.
- Aligns with recent tracing simplification efforts.
- Updated `VerifyTests` in unit test cases to remove redundant string argument.
- Added generated snapshot files for `OnInit`, `OnShutdown`, and `ExpressionLambdaVerifyTests`.
- Streamlines testing process by incorporating auto-generated code snapshots.
@github-actions github-actions Bot added the type: chore Maintenance task label Dec 11, 2025
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Dec 11, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #229      +/-   ##
==========================================
+ Coverage   88.73%   89.61%   +0.87%     
==========================================
  Files         106      104       -2     
  Lines        2273     2128     -145     
  Branches      256      253       -3     
==========================================
- Hits         2017     1907     -110     
+ Misses        165      129      -36     
- Partials       91       92       +1     
Files with missing lines Coverage Δ
...SourceGenerators/MapHandlerIncrementalGenerator.cs 91.91% <100.00%> (-2.63%) ⬇️
...lLambda.SourceGenerators/Models/CompilationInfo.cs 100.00% <100.00%> (+20.00%) ⬆️
...ers/LambdaApplicationBuilderBuildSyntaxProvider.cs 93.10% <100.00%> (+23.40%) ⬆️
...rc/MinimalLambda/Core/Options/LambdaHostOptions.cs 100.00% <ø> (ø)
...rc/MinimalLambda/Runtime/LambdaBootstrapAdapter.cs 38.09% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e877f28...baf8bdf. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@j-d-ha j-d-ha added the breaking-change Introduces a breaking change label Dec 12, 2025
@j-d-ha
j-d-ha merged commit 10c4ea0 into main Dec 12, 2025
8 checks passed
@j-d-ha
j-d-ha deleted the chore/remove-dead-code branch December 12, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change type: chore Maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant